<?php
require_once('libs/Rmail.php');
  
class Mail
{
  public function send($from, $to, $subject, $text, $file)
  {
    $mail = new Rmail();
    $mail->setFrom($from);
    $mail->setSubject($subject);
    $mail->setText($text);
    $mail->setReceipt($to);
    $mail->addAttachment(new fileAttachment($file));
    $address = $to;
    $result  = $mail->send(array($address));
    return $result;
  }
}
?>